<template>
  <div class="box">
    <h2 class="title">MixinTest组件标题: {{m}}</h2>
    <child/>
  </div>
</template>

<script>
import {myMixin} from '@/mixins'
import Child from './Child.vue'
export default {
  components: { Child },
  name: 'MixinTest',
  mixins: [myMixin],

  mounted () {
    this.fn()
  },
  methods: {
    fn () { // 如果组件的代码与mixin的重复了, 优先使用自己的
      console.log('MixinTest fn...')
    }
  }
}
</script>